package com.sinopec.pi.scalaguide.classes


/*
 * case class and object usage.
 */

case class Message(sender: String, recipient: String, body: String)


object Message {
    def main(args: Array[String]): Unit = {
        val message2 = Message("jorge@catalonia.es", "guillaume@quebec.ca", "Com va?")
        val message3 = Message("jorge@catalonia.es", "guillaume@quebec.ca", "Com va?")
        // 即使 message2 和 message3 引用不同的对象，每个对象的值也是相等的。
        println(message2 == message3)   // true
    }
}


